package com.bing.dao;

import com.bing.bean.weixin.Command;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Administrator on 2015/6/7.
 */
@Repository
public interface CommandDao {

    @Select("select * from AccountCommand where accountId=#{id}")
    @Results(@Result(property = "responseMessage",column = "msgId",many = @Many(select = "com.bing.dao.MessageDao.findById")))
    List<Command> findCommandsByAccountId(int id);
}
